import { currentProject } from './../../../currentConfig';
import { adapter, currentFramework } from './adapter';
import { InitializationService } from './index';
import { PrividerService } from "./prividerService"
const Component = require('@angular/core').Component;

@Component(adapter.warpComponentMeta({
    styleUrls: ['./index.scss'],
    template: `
        <div class="welcome-container">
            <header>
                <figure>
                    <h1>欢迎 ！</h1>
                    <hr>
                    <p>初次使用，请根据设置向导配置{{currentProject=="chef"?'制作台':'传菜台'}}。</p>
                </figure>
            </header>
            <button (click)="start()" >好的</button>  
        </div>
    `
}))
export default class Welcome {
    private currentProject = currentProject;

    start() {
        const store = {};
        const user = {};
        const LDCConfig = {
            "host": "172.16.255.132",
            "device": {
                "ppi": 96,
                "hardware": "Gigabyte Technology Co., Ltd. To be filled by O.E.M.",
                "deviceType": "desktop",
                "deviceId": "40:8D:5C:82:E3:5C",
                "platform": "Windows",
                "platformVersion": "6.1.7601",
                "os": "Microsoft Windows 7 旗舰版  Service Pack 1 64-bit",
                "appShell": "menpuji WindowsAPP 2.13.0 building 20170228",
                "appVersion": "2.13.0",
                "ldcVersion": "",
                "ip": "172.16.255.132"
            },
            "terminal": {
                "id": "bf79ff24d2444583809d7a5988c86271",
                "name": "P24"
            },
            "version": 2,
            "state": "on",
            "services": {
                "fbs": "on",
                "fns": "on"
            }
        }

        // InitializationService.current.onComplete({ store, LDCConfig, user })//debug

        PrividerService.current.setAdsAbout();
        PrividerService.current.navigate(InitializationService.current.getPathByComponentName("connectLDC"))
    }
}




